package org.example.appstart;

import org.apache.commons.io.FileUtils;
import org.example.exception.ExceptionReporter;

import java.io.File;
import java.nio.charset.Charset;

@Deprecated
public class AppInfoLoader {
    private static final String path = "F:/start-app-info.json";
    public static String read() {
        String result = "";
        try {
            result = FileUtils.readFileToString(new File(path), Charset.defaultCharset());
        } catch (Exception e) {
            ExceptionReporter.saveLog(e, true);
        }
        return result;
    }

    public static void write(String json) {
        try {
            FileUtils.writeStringToFile(new File(path), json);
        } catch (Exception e) {
            ExceptionReporter.saveLog(e, true);
        }
    }
}
